
<!-- DataTables -->
<link rel="stylesheet"
	  href="./app/lib/datatables/media/css/dataTables.bootstrap.css">

<div ng-controller="promotionproductalbumcontent as gt">
	<section class="content-header">
		<h1>
			{{title}}<small></small>
		</h1>
	</section>
	<section class="content">
		<div class="box box-default">
			<div class="col-md-12">
				<div class="box-body" >
					<alertdanger></alertdanger>
					<alertsuccess></alertsuccess>


					<form role="form">
						<div class="form-group">
							<label>专辑商品标题</label> <input maxlength="100" required="required"
													   ng-model="sectiontitle" class="form-control" type="text"
													   placeholder="请输入内容标题"  value="" >
						</div>
						<div class="form-group">
							<label>专辑商品介绍</label> <input maxlength="500" required="required"
													   ng-model="content" class="form-control" type="text"
													   placeholder="请输入内容介绍"  value="" >
						</div>
						<div class="form-group">
							<label>专辑商品清单说明</label> <input maxlength="200" required="required"
													   ng-model="des" class="form-control" type="text"
													   placeholder="请输入商品说明"  value="" >
						</div>
						<div class="form-group">
							<label>专辑商品图片</label>
							<div ngf-drop ngf-select ng-model="rmainfiles" class="drop-box"
								 ngf-drag-over-class="'dragover'" ngf-multiple="true"
								 ngf-allow-dir="true" accept="image/*" ngf-pattern="'image/*'">
								<button class="btn btn-default btn-block btn-sm">选择文件</button>
								<div ngf-no-file-drop>File Drag/Drop is not supported for
									this browser</div>
							</div>
							<div class='box-body'>
								<div class="progress progress-sm active">
									<div
											class="progress-bar progress-bar-success progress-bar-striped"
											role="progressbar" aria-valuenow="0" aria-valuemin="0"
											aria-valuemax="100" style="width: {{rmainprogress}}%">
										<span class="sr-only">20% Complete</span>
									</div>
								</div>
								<div ng-repeat="img in allrmainfiles">
									<div ng-if="img.isCloudImg">
										<div class="alert alert-success alert-dismissable">
											<button ng-click="removeallrmainfiles($index)" type="button" class="close"
													data-dismiss="alert" aria-hidden="true">&times;</button>

											<img class="img-responsive pad"
												 ng-src="{{img.normalfilepath}}" alt="Photo">
											<div ng-if="img.compressfilepath!=null&&img.compressfilepath!==''"><img
													class="img-responsive pad" ng-src="{{img.compressfilepath}}"
													alt="Photo">
											</div>

										</div>
									</div>
									<div ng-if="!img.isCloudImg">
										<div class="alert alert-success alert-dismissable">
											<button ng-click="removeallrmainfiles($index)" type="button" class="close"
													data-dismiss="alert" aria-hidden="true">&times;</button>

											<img class="img-responsive pad"
												 ng-src="{{img.basepath+img.normalfilepath}}" alt="Photo">

											<div ng-if="img.compressfilepath!=null&&img.compressfilepath!==''">
												<img class="img-responsive pad"
													 ng-src="{{img.basepath+img.compressfilepath}}" alt="Photo">
											</div>
										</div>


									</div>
								</div>

							</div>
						</div>
						<div class="col-xs-12">
							<div class="box">
								<div class="box-header">
									<h3 class="box-title">已选货物内容</h3>
								</div><!-- /.box-header -->
								<div class="box-body table-responsive no-padding">
									<table class="table table-hover">
										<tr>
											<th>货物编号</th>
											<th>图片</th>
											<th>货物名称</th>
											<th>成本价格</th>
											<th>会员价格</th>
											<th>库存</th>
											<th>操作</th>
										</tr>
										<tr ng-repeat="at in selectedproducts track by $index">
											<td>{{at.id}}</td>
											<td><img class="img-responsive pad" style="width: 50px;height: 50px;" src="{{at.mainimg}}" alt="Photo"></td>
											<td>{{at.productname}}</td>
											<td>{{at.saleprice|currency:"¥"}}</td>
											<td>{{at.memberprice|currency:"¥"}}</td>
											<td>{{at.stock|number}}</td>
											<td><button ng-click="removeselectproduct($index);" class='btn btn-box-tool'>删除</button></td>
										</tr>

									</table>
								</div><!-- /.box-body -->
							</div><!-- /.box -->
						</div>

						<div class="box-body">
							<div class="form-group">
								<button ng-click="showsearchproduct();" class="btn btn-block btn-success btn-sm">选择专题货物</button>
							</div>
						</div>
						<div class="box-body" >
							<div class="form-group" ng-show="searchproduct">
								<div class="box box-success">
									<div class="box-header with-border">
										<h3 class="box-title">搜索货物</h3>
									</div>
									<div class="box-body">
										<div class="form-group">
											<div class="col-md-3" ng-init="findallgoodstype();">
												<label>商品类型</label> <select ng-change="goodstypechange();"
																			ng-model="selectedgoodstype"
																			ng-options="gs.name for gs in goodstypeselect"
																			class="form-control select2" style="width: 100%;">
												<option ng－value="-1">--请选择--</option>
											</select>
											</div>
											<div class="col-md-3">
												<label>货物名称</label>
												<input maxlength="20"
													   ng-model="productname" class="form-control" type="text"
													   placeholder="请输入货物名称" value="" />
											</div>
											<div class="col-md-3">
												<label>货号</label>
												<input maxlength="20"
													   ng-model="psn" class="form-control" type="text"
													   placeholder="请输入货号" value="" />
											</div>
										</div>

									</div>
									<div class="box-body">
										<div class="form-group">
											<button ng-click="searchdataTableCustom();" class="btn btn-block btn-success btn-sm">检索</button>
										</div>
									</div>

								</div>
								<div class="col-xs-12">
									<div class="box">
										<div class="box-header"></div>
										<div class="box-body" >
											<table datatable="" dt-options="gt.dtOptions"
												   dt-columns="gt.dtColumns"
												   dt-instance="gt.dtInstance"
												   class="table table-striped table-bordered"></table>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label> <input type="radio" ng-model="status"
										   ng-value="1" class="flat-red" ng-checked="true"> 启用
							</label> <label> <input type="radio" ng-model="status"
													ng-value="0" class="flat-red"> 禁用
						</label>
						</div>
						<div class="box-footer">
							<button ng-show="savebtn.show" type="button"
									class="btn btn-primary" ng-click="save();">保存</button>
							<button ng-show="updatebtn.show" type="button"
									class="btn btn-primary" ng-click="update();">更新</button>
						</div>
					</form>
				</div>
			</div>


			<div class="box-footer"></div>
		</div>
	</section>
</div>
